1. Field of the Invention
The present invention is directed generally to an imaging apparatus, an image processing method, and a computer program product.
2. Description of the Related Art
Conventionally, there are techniques for detecting a motion vector of a whole image to perform correction of blurring associated with motion of a digital camera by movement of a user's hands. For instance, an invention is disclosed in Japanese Patent Application Laid-open No. 2006-287814, which relates to an imaging apparatus or the like that uses an AF value of each region when evaluating a motion vector per region obtained by dividing a frame of a subject in a matrix.
In the invention related to the imaging apparatus or the like disclosed in Japanese Patent Application Laid-open No. 2006-287814, in order to prevent an object unrelated to the subject to be captured from adversely affecting determination of the motion vector, an AF evaluation value of a region including a focused object is made higher than an AF evaluation value of an unfocused region and the motion vector per region is weighted.
However, in the invention related to the imaging apparatus and the like disclosed in Japanese Patent Application Laid-open No. 2006-287814, a case in which an edge portion of an object or the like is included in a region is not considered. An AF evaluation value indicates contrast of an image and is large in a region including an edge portion.
When detecting motion of a region including an edge, the motion of the region including the edge may not be detected if a direction of motion of a whole image is the same as a direction in which the edge extends. Sometimes motion in the direction in which the edge extends is detected even if there is no motion of the region.
Hence, using an AF evaluation value in weighting a motion vector per region tends to cause false detection when there is relative motion in an edge direction between an imaging apparatus and a subject.